let obj = {
    name:'csc',
    age:'18',
    arr:[1,2,3]
}

Object.prototype.myKeys = function(obj) {
    let result = []
    for(let i in obj) {
        if(obj.hasOwnProperty(i)) {
            result.push(i)
        }
    }
    return result
}

let a = Object.myKeys(obj)
console.log(a);